from django.urls import re_path
from .views import index_views,users_views,category_views,goods_views

urlpatterns = [
    # 系统管理员
    re_path(r'^$',index_views.index,name='myadmin_index'),
    re_path(r'^login/$',index_views.login,name='myadmin_login'),
    re_path(r'^verifycode/$',index_views.verifycode,name='myadmin_yzm'),
    re_path(r'^outlogin/$',index_views.outlogin,name='myadmin_out'),

    # 用户管理
    re_path(r'^userlist/$',users_views.userlist,name='myadmin_userlist'),
    re_path(r'^adduser/$',users_views.adduser,name='myadmin_adduser'),
    re_path(r'^deluser/$',users_views.deluser,name='myadmin_deluser'),
    re_path(r'^edituser/$',users_views.edituser,name='myadmin_edituser'),
    re_path(r'^respwd/$',users_views.respwd,name = 'myadmin_respwd'),
    re_path(r'^changes/$',users_views.changes,name = 'myadmin_changes'),

    # 商品种类
    re_path(r'^categorylist/$',category_views.category,name='myadmin_categorylist'),
    re_path(r'^addcategory/$',category_views.addcategory,name='myadmin_addcategory'),
    # 删除
    re_path(r'^delcate/$',category_views.delcate,name='myadmin_delcate'),
    # 修改
    re_path(r'^editcate/$',category_views.editcate,name='myadmin_editcate'),

    # 商品信息
    re_path(r'^addgoods/$', goods_views.addgoods, name='myadmin_addgoods'),
    re_path(r'^goodsinsert/$', goods_views.goodsinsert, name='myadmin_goodsinsert'),
    re_path(r'^goodslist/$', goods_views.goodslist, name='myadmin_goodslist'),
    re_path(r'^delgoods/$',goods_views.delgoods,name='myadmin_delgoods'),
    re_path(r'^editgoods/$',goods_views.editgoods,name='myadmin_editgoods'),
]

